package com.pug.controller.user;

import com.pug.entity.KssUser;
import com.pug.service.user.IUserService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 飞哥
 * @Title: 学相伴出品
 * @Description: 飞哥B站地址：https://space.bilibili.com/490711252
 * 记得关注和三连哦！
 * @Description: 我们有一个学习网站：https://www.kuangstudy.com
 * @date 2022/3/16$ 23:56$
 */
@Api(tags = "用户模块")
@RestController
@RequiredArgsConstructor
public class UserController {

    private final IUserService userService;

    @ApiImplicitParam(name = "id",value = "用户主键",required = true)
    @ApiOperation(value = "根据用户ID获取用户数据信息")
    @GetMapping("/getuser/{id}")
    public KssUser getUser(@PathVariable("id")Long id){
        return userService.getById(id);
    }

}
